#include <iostream>
#include <string>
using namespace std;
/*
24、Create a class containing a string as a data member. Initialize the string in the constructor, but do not create a copy-constructor or operator=. Make a second class that has a member object of your first class; do not create a copy-constructor or operator= for this class either. Demonstrate that the copy-constructor and operator= are properly synthesized by the compiler.
*/

class C1{
public:
	string data;
	
	C1():data("data"){
		
	}
};

class C2{
public:
	C1 c1;
};

int main(int argc, char *argv[]) {
	C1 a;
	C1 b(a);
	C1 c = a;
	cout << "the copy-constructor and operator= of class C1 are properly synthesized by the compiler." << endl;

	C2 d;
	C2 e(d);
	C2 f = d;
	cout << "the copy-constructor and operator= of class C2 are properly synthesized by the compiler." << endl;
}